1. Field of the Invention
The present invention generally relates to a stable current source circuit and, more particularly to a stable current source circuit employing a compensation circuit to output a stable current.
2. Description of the Prior Art
In an oscillator and a digital-to-analog converter (DAC), a stable and variable bias current is required. Generally, a current source circuit comprises an internal resistor and a diode so as to provide a stable output current. In order to adjust the output current, those who are skilled in this art employ an external resistor to replace the internal resistor. However, the current flowing on the external may be disturbed due to an external capacitor. To overcome such a problem, a resistor and a capacitor are added. The capacitor and the external resistor result in a pole and a zero in the transfer function such that the oscillation of the bias circuit is reduced and the closed-loop gain becomes less than 1. Therefore, the current can keep stable.
In a prior art embodiment as shown in FIG. 1, an NMOS current mirror is composed of a first NMOS transistor N11 and a second NMOS transistor N12 with the gates of the two transistors connected. A positive feedback loop is formed of a PMOS current mirror composed of a first PMOS transistor P11 and a second PMOS transistor P12 with the gates of the two transistors connected and a third PMOS transistor P13. With a first resistor R11, the gain of the circuit as shown in FIG. 1 is less than 1 so that the current remains stable.
In another prior art embodiment as shown in FIG. 2, an NMOS current mirror is composed of a third NMOS transistor N21 and a fourth NMOS transistor N22 with the gates of the two transistors connected. A positive feedback loop is formed of a PMOS current mirror composed of a fourth PMOS transistor P21 and a fifth PMOS transistor P22 with the gates of the two transistors connected and a sixth PMOS transistor P23. With a second resistor R21 and a first capacitor C21, the gain of the circuit as shown in FIG. 2 is larger than 1 so that the current remains unstable.
Therefore, there is need in providing a stable current source circuit to output a stable current.
Accordingly, it is the primary object of the present invention to provide a stable current source circuit with an external resistor.
In order to achieve the foregoing object, the present invention provides a stable current source circuit with a compensation circuit, comprising: a PMOS current mirror, connected to a power supply so as to output a stable current; an NMOS current mirror, connected to a third bipolar junction transistor and a fourth compensation resistor; a third bipolar junction transistor, the emitter of the third bipolar junction transistor connected to the NMOS current mirror and both of the base and the collector grounded; and a fourth compensation resistor, interconnected between the NMOS current mirror and the compensation circuit.
The present invention further provides a stable current source circuit with a compensation circuit, comprising: a PMOS current mirror, connected to a power supply so as to output a stable current; an NMOS current mirror, connected to a fourth bipolar junction transistor and a sixth compensation resistor; a fourth bipolar junction transistor, the emitter of the fourth bipolar junction transistor connected to the NMOS current mirror and both of the base and the collector grounded; a sixth compensation resistor, interconnected between the NMOS current mirror and the compensation circuit; and a fourth compensation capacitor, interconnected between the source and the drain of an NMOS transistor of the NMOS current mirror.